/** * 2007-2023 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@buy-addons.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author Buy-addons * @copyright 2007-2023 Buy-addons * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ function reload_product(json_product){ var html_pr = ''; var html_tt = ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; for(i=0;i'; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; html_pr+= ''; } html_pr+= '
'+table_header_product+''; html_pr+= ''+table_header_sku+''; html_pr+= ''; html_pr+= ''+table_header_UP+''; html_pr+= ''+table_header_Qty+''; html_pr+= ''+table_header_Total_1+''; html_pr+= '
'; html_pr+= ''+json_product[i].product_name+''; html_pr+= ''; html_pr+= '
'+json_product[i].combination+'
'; html_pr+= '
'; html_pr+= ''+json_product[i].reference+''; html_pr+= ''; html_pr+= ''; html_pr+= sign_currency + parseFloat(json_product[i].product_pri).toFixed(2); html_pr+= ''; html_pr+= ''; html_pr+= ''+json_product[i].product_qty+''; html_pr+= ''; html_pr+= sign_currency + parseFloat(json_product[i].total_pri).toFixed(2); html_pr+= ' '; html_pr+= ''; html_pr+= '
'; html_tt+= ''; html_tt+= ''; html_tt+= ''; html_tt+= ''; html_tt+= ''; html_tt+= ''; html_tt+= ''; html_tt+='
'+table_header_Total_2+''; if(json_product['number_product'] > 0) { html_tt+= sign_currency + parseFloat(json_product['total_price']).toFixed(2); }else { html_tt+= sign_currency + '0,00 '; } html_tt+= '
'; jQuery(".total_price").html(html_tt); jQuery(".list_product").html(html_pr); } function reload_mess(json_mess){ var html = ''; for(i=0;i'; html+= ''; html+= '
'; html+= 'added on '+jQuery.format.date(json_mess[i].date_send,'MMM dd,yyyy')+' at '+jQuery.format.date(json_mess[i].date_send,'HH:MMa')+' pm by '+json_mess[i].email+' '+table_header_delete_messa+''; html+= '
'; html+= ''; }else { html+= '
'; html+= '
'; html+= ''+json_mess[i].content_mes+''; html+= '
'; html+= '
'; html+= 'added on '+jQuery.format.date(json_mess[i].date_send,'MMM dd,yyyy')+' at '+jQuery.format.date(json_mess[i].date_send,'HH:MMa')+' pm by '+json_mess[i].email+' '+table_header_delete_messa+''; html+= '
'; html+= '
'; } } jQuery(".box_message").html(html); } function del_message(id_mess,id_quote){ var conditation = 0; var baseurl = window.location.hostname; var demoMod = demo_mod; if(demoMod == 1){ jQuery(".show_demoMod").show(); return false; } jQuery.ajax({ type: 'POST',//phương thức gửi jscrossDomain: window.location.hostname, crossDomain: true, url: '../index.php?controller=delmessagedbboo&fc=module&module=askforaquotemodul', // lấy link của controller mới data:'id_mess=' + id_mess + '&id_quote=' + id_quote + '&conditation=' + conditation + '"e_token=' + token_askaquotemodule + '&ajax=1', // lấy dữ liệu từ id product ở trên định nghĩa dataType:"json", success: function(json_mess,textStatus,jqXHR) { reload_mess(json_mess); jQuery(".show_message").show(); jQuery(".show_message").fadeOut(5000); }, error: function(XMLHttpRequest, textStatus, errorThrown) { } }); } function del_product_view(id_combi_view,id_quote,id_product_view,ob){ var conditation = 1; var baseurl = window.location.hostname; var demoMod = demo_mod; if(demoMod == 1){ jQuery(".show_demoMod").show(); return false; } jQuery.ajax({ type: 'POST',//phương thức gửi jscrossDomain: window.location.hostname, crossDomain: true, url: '../index.php?controller=delmessagedbboo&fc=module&module=askforaquotemodul', // lấy link của controller mới data:'id_quote=' + id_quote + '&id_combination=' + id_combi_view + '&conditation=' + conditation + '&id_product_view_dbboo=' + id_product_view + '&demoMod=' + demoMod + '"e_token=' + token_askaquotemodule + '&ajax=1', // lấy dữ liệu từ id product ở trên định nghĩa dataType:"json", beforeSend: function() { $(ob).parent().find(".icon-trash").removeClass("icon-trash").addClass("icon-refresh icon-spin"); }, success: function(json_product,textStatus,jqXHR) { $(ob).closest('tr').remove(); $('.total_price_quote_dbboo span').text(json_product['total_price_formatted']); $('#td_totalprice_newquote, .td_fixed_total_price').val(json_product['total_price']); $('.batotalproducts').val(json_product['total_price']); jQuery(".show_message").show(); jQuery(".show_message").fadeOut(5000); } }); }